// -----------------------------
// Author: 		Dhaenens Gert 
// Creation: 	9/16/2014 5:33:22 PM				
// -----------------------------

#ifndef _Log_h
#define _Log_h

#include "StdDef.h"

class Thread;
class Mutex;

class Log
{
public:
	static void	Open(const TChar* strFile);
	static void Flush();
	static void Close();

	template<typename T>
	static void Write(const T& value);
	static void	Write(const TChar* lpLine);
	static void WriteLine(const TChar* fmpt, ...);
	static void	WriteLineSeperator();
	static void WriteDashedLine();

	static Bool	TryEnter();
	static void	Leave();

private:

	static TOutputStream	s_Stream;
	static Thread*			s_lpFlushThread;
	static Mutex*			s_lpMutex;


	Log();
	~Log();
	Log(const Log& refLog);
	Log& operator=(const Log& refLog);
};

#include "Log.inl"
#endif